__copyright__ = "SnohomaNET, 2010 - www.snohoma.net"
__doc__ = """\
Pystalt Package Manager

usage:
	import Cognition.Pystalt as Pystalt
	import Cognition.Pygmund.Id as Id
	
	# Package Manager
	c = Id.Init("~/.config/Cognition/cognition.conf")
	mode = "user"
	P = Pystalt.Init(c, mode)

	# Development Packager
	c = Id.Init("~/.config/Cognition/cognition.conf")
	mode = "dev"
	P = Pystalt.Init(c, mode)
	
	# Repository Manager
	c = Id.Init("/etc/cognition.conf")
	mode = "repo"
	P = Pystalt.Init(c, mode)
	
"""

def Init(conf, mode="user"):
	if mode == "dev":
		import Packager
		r = Packager.Init(conf)
		return r
	elif mode == "user":
		import Manager
		r = Manager.Init(conf)
		return r
	elif mode == "repo":
		import Repository
		r = Repository.Init(conf)
		return r
	else:
		return False
